The most fundamental building block of object-oriented programming is called an “object”. Generally speaking, an object has zero or more methods and zero or more member fields. Accordingly, in order to be properly interpreted by a computing system, the object should be of a particular type understood by the computing system. Primitive types include types that are provided by the programming language itself as basic building blocks for the programmer. Examples of primitive types might include a character, a string, an integer, a floating point number, an array, and so forth. Programming languages typically allow programmers to construct composite types that represent a combination of constituent types, whether those constituent types are primitive types or other composite types. Such composite types can be quite complex.
It is often advantageous to know the type of a particular object. Accordingly, in memory during execution time, an object often has an associated type descriptor. In one example, the object has a type description pointer that points to a more complete type descriptor. The type descriptor might be used for a variety of purposes. For one, the type descriptor for an object may be evaluated in order to verify that a particular operation may be performed by the object, or to determine that the object is of the same or equivalent type as another object.
One particular kind of object is called a “frozen object”. A frozen object instance is one whose layout is completed at compile time and is included as part of the compiled image. Objects that are not subject to extensive or perhaps any change during run-time are perhaps the best candidates for object freezing, but any object instance with pre-initialized data may be frozen. For instance, a calendar program might provide a daily inspirational quote selected from amongst 1000 predetermined quotes. Each of those 1000 predetermined quote may be represented in a frozen object of type string. Instructions within the module may refer to the frozen object. At run-time, the frozen object is loaded into memory along with much or all of the other portions of the module. However, there would be no need to newly allocate the frozen object at run-time.